package exercise.coroutine.easy.q1;

import java.util.UUID;
import java.util.concurrent.TimeUnit;

public class OrderService {

    public static Order getOrderById(Long id) throws InterruptedException {
        Order order = new Order();
        order.setId(1L);
        order.setTxSerialNo(UUID.randomUUID().toString().replace("-", ""));
        TimeUnit.SECONDS.sleep(1);
        System.out.println(Thread.currentThread() + "查询订单接口执行完毕" + System.currentTimeMillis());
        return order;
    }
}
